#ifndef LEARN_VULKAN_TEXTURE_H
#define LEARN_VULKAN_TEXTURE_H

#include "VkBundle.h"

struct VkCameraImage{
    struct{
        VkImage mImg = VK_NULL_HANDLE;
        VkDeviceMemory mMemory = VK_NULL_HANDLE;
        VkImageView mImgView = VK_NULL_HANDLE;
        VkSampler mSampler = VK_NULL_HANDLE;
    } yImg;

    struct{
        VkImage mImg = VK_NULL_HANDLE;
        VkDeviceMemory mMemory = VK_NULL_HANDLE;
        VkImageView mImgView = VK_NULL_HANDLE;
        VkSampler mSampler = VK_NULL_HANDLE;
    } uvImg;
    size_t mDataSize = 0;
};

class VkYuvTexture {
public:
    VkYuvTexture() = delete;
    VkYuvTexture(const std::string &filePath, uint32_t width, uint32_t height);

    void destroy(VkDevice device);
    VkCameraImage cameraImage;
};

class VkRgbTexture {
public:
    VkRgbTexture() = delete;
    VkRgbTexture(const std::string &filePath, uint32_t width, uint32_t height);

    void destroy(VkDevice device);

    VkImage mImg = VK_NULL_HANDLE;
    VkDeviceMemory mMemory = VK_NULL_HANDLE;
    VkImageView mImgView = VK_NULL_HANDLE;
    VkSampler mSampler = VK_NULL_HANDLE;
};


#endif //LEARN_VULKAN_TEXTURE_H
